<cfset var.start = CreateODBCdateTime(now())>
<cfparam name="attributes.url" default="#application.xtiurl#">
<cfparam name="attributes.dtd" default="#application.xtidtd#">

<cfparam name="attributes.customerid">
<cfparam name="attributes.contactid">
<cfparam name="attributes.message_type" default="A">
<cfparam name="attributes.orderid" default="">
<cfparam name="attributes.invoice_number" default="">
<cfparam name="attributes.permanent" default="Y">
<cfparam name="attributes.security_level" default="1">
<cfparam name="attributes.user" default="">
<cfparam name="attributes.debug" default="false">
<cfparam name="attributes.debuglevel" default="1,2,3">
<cfparam name="returnstruct.msgcount" default=0>
<!--- ---------------------------------------------------------------------------
Build the xml request doc  for our good middle ware friends Then post that puppy
to those middleware gurus.  Notice each system will need a specific post.--->
<cfscript>
xml = 
'<!DOCTYPE copy SYSTEM "#attributes.dtd#">
<xtiinput>
   <inputheader>
      <actionset>
         <action>get_messages</action>
      </actionset>
   </inputheader>
   <inputdata>
      <customerid>#ucase(attributes.customerid)#</customerid>
	  <contactid>#ucase(attributes.contactid)#</contactid>
      <msg>
         <message_type>#attributes.message_type#</message_type>
         <orderid>#attributes.orderid#</orderid>
         <invoice_number>#attributes.invoice_number#</invoice_number>
         <permanent>#attributes.permanent#</permanent>
         <security_level>#attributes.security_level#</security_level>
         <user>#attributes.user#</user>
      </msg>
   </inputdata>
</xtiinput>';
</cfscript>